<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>下拉刷新</title>
    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/Cookies.js/1.2.1/cookies.min.js"></script>
    <link href="/base/weui/css/weui.min.css" rel="stylesheet" />
    <link href="/base/weui/css/jquery-weui.min.css" rel="stylesheet" />
    <link href="/styles/base.css" rel="stylesheet" />
    <script src="/scripts/art/template-web.js"></script>
    <script src="/base/lib.js?v=2018"></script>
</head>

<body>
    <div id="app" class="app">
        <div class="weui-pull-to-refresh__layer">
            <div class='weui-pull-to-refresh__arrow'></div>
            <div class='weui-pull-to-refresh__preloader'></div>
            <div class="down">下拉刷新</div>
            <div class="up">释放刷新</div>
            <div class="refresh">正在刷新</div>
        </div>
        <div class="weui-form-preview"></div>
    </div>
</body>

</html>
<script src="/base/weui/jquery-weui.min.js"></script>
<script type="text/html" id="tp-html">
    {{each}}
    <div class="weui-form-preview__hd">
        <label class="weui-form-preview__label">付款金额</label>
        <em class="weui-form-preview__value">¥2400.00</em>
    </div>
    <div class="weui-form-preview__bd">
        <div class="weui-form-preview__item">
            <label class="weui-form-preview__label">商品</label>
            <span class="weui-form-preview__value">电动打蛋机</span>
        </div>
        <div class="weui-form-preview__item">
            <label class="weui-form-preview__label">标题标题</label>
            <span class="weui-form-preview__value">名字名字名字</span>
        </div>
        <div class="weui-form-preview__item">
            <label class="weui-form-preview__label">标题标题</label>
            <span class="weui-form-preview__value">很长很长的名字很长很长的名字很长很长的名字很长很长的名字很长很长的名字</span>
        </div>
    </div>
    {{/each}}
</script>
<script>
    $(function () {
        //调起服务器后台
        $("#app").HttpPullToRefresh("order/list", {}, function (data) {
            $(".weui-form-preview").append(template("tp-html", data));
        })
    })
</script>